//注册
let pwd = $("#password").val();
let rpwd = $("#rpassword").val();
if (pwd == rpwd) {
    $("#editForm").ajaxForm({
        url: domainUrl + "/users/regist",
        type: "POST",
        success: function (data) {
            if (data.code == 200) {
                location.href = "/login.html";
            } else {
                popup(data.msg);
            }
        }
    });
} else {
    alert("两次密码输入不一致")
}


var vue = new Vue({
    el: "#regist",
    data: {},
    methods: {
        /*regist: function () {
            let username = $("#username").val();
            let pwd = $("#password").val();
            let rpwd = $("#rpassword").val();
            if (pwd == rpwd) {
                ajaxPost("/users/regist", {name: username, password: pwd}, function (data) {
                    alert(data.msg);
                });
            } else {
                alert("两次密码输入不一致")
            }

        }*/
    }
});